Asian Restaurants
import numpy as np
import pandas as pd
import os
for dirname, _, filenames in os.walk('/kaggle/input'):
for filename in filenames:
print(os.path.join(dirname, filename))
data = pd.read_csv("../input/asian-restaurants/asia.csv")
data
numerics = ['int16', 'int32', 'int64', 'float16', 'float32', 'float64']
numeric_df = data.select_dtypes(include=numerics)
numeric_df
import matplotlib.pyplot as plt
for col in numeric_df.columns:
plt.title('Boxplot of {}'.format(col))
plt.boxplot(data[col])
plt.show()
for col in numeric_df.columns:
plt.title('Boxplot of {}'.format(col))
plt.hist(data[col])
plt.show()
pivot = data.pivot_table(index=['town'], values=['yRating'], aggfunc='count')
print (pivot)
from mpl_toolkits.basemap import Basemap
plt.figure(figsize=(8, 8))
m = Basemap(projection='ortho', resolution=None, lat_0=1.35, lon_0=103)
m.bluemarble(scale=0.5);
town_uni = data.drop_duplicates(subset = ["town"])
town_uni.reset_index(inplace=True)
town_uni
for i,j in enumerate(town_uni['town']):
fig = plt.figure(figsize=(8, 8))
m = Basemap(projection='lcc', resolution=None,
width=8E6, height=8E6,
lat_0=town_uni['latitude'][i], lon_0=town_uni['longitude'][i])
m.etopo(scale=0.5, alpha=0.5)
x, y = m(town_uni['longitude'][i], town_uni['latitude'][i])
plt.plot(x, y, 'ok', markersize=5)
plt.text(x, y, town_uni['town'][i], fontsize=12);
plt.show()
fig = plt.figure(figsize=(8, 8))
m = Basemap(projection='lcc', resolution=None,
width=4E5, height=4E5,
lat_0=data['latitude'][0], lon_0=data['longitude'][0])
m.etopo(scale=7, alpha=0.5)
x, y = m(data['longitude'][0], data['latitude'][0])
plt.plot(x, y, 'ok', markersize=5)
plt.text(x, y, data['town'][0], fontsize=12);